package com.springdemo.controller;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
/**
 * By implementing BeanPostProcessor, we can use below implemented methods for all the beans
 * @author aditya_priyadarshi
 *
 */
public class BeanPostProcessorImplementation implements BeanPostProcessor {

	public Object postProcessAfterInitialization(Object bean, String beanName)
			throws BeansException {
		System.out.println("Inside postProcessAfterInitialization for bean:"+beanName);
		return bean;
	}

	public Object postProcessBeforeInitialization(Object bean, String beanName)
			throws BeansException {
		System.out.println("Inside postProcessBeforeInitialization for bean:"+beanName);
		return bean;
	}

}
